<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form" %>

<%@ include file="../general/header.jsp" %>

	<div id="header">${title}</div>
	<%@ include file="../general/menu.jsp" %>
		<div id="content">
		<form:form method="POST" action="../item/offerOnItem" commandName="offerForm">

			<input type="hidden" id="id" name="itemId" value="${item.id}" >
			<input type="hidden" id="id" name="auctionId" value="${auction.id}" >
			
			<span>Base Price: ${item.precio}</span>
			<form:input type="hidden" path="basePrice" value="${item.precio}"/><br />
			<br />
			<span>Amount: ${item.count}</span>
			<form:input type="hidden" path="count" value="${item.count}"/><br />
			<br />
			<span>Offer price: </span>
			<form:input  path="offerPrice" /><br />
			<form:errors path="offerPrice" />
			<br />

			<input type="submit" value="Offer!" />
		</form:form>
	</div>
	<div id="bottom">
		<span class="inline spaced">
			<a class="color" href="../general/index">Go back to index</a>
		</span>
	</div>
	<%@ include file="../general/footer.jsp" %>